%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/relay/defaultNodeIdCodec.computed-id.minimal"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 11, 12, 18, 58, 59, 60, 7, 8, 13, 19, 20, 33, 34, 46, 47<br />2: 22, 36, 49<br />3: 25, 39, 52<br />ᐳ: 24, 26, 27, 30, 38, 40, 41, 43, 51, 53, 54, 56<br />4: PgSelect[10]<br />5: PgSelectRows[15]<br />ᐳ: First[14], PgSelectSingle[16]"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 16<br /><br />ROOT PgSelectSingleᐸusersᐳ[16]"):::bucket
    end
    Bucket0 --> Bucket1

    %% plan dependencies
    PgSelect10[["PgSelect[10∈0] ➊<br />ᐸusersᐳ"]]:::plan
    Object13{{"Object[13∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access8{{"Access[8∈0] ➊<br />ᐸ7.1ᐳ"}}:::plan
    PgFromExpression30{{"PgFromExpression[30∈0] ➊"}}:::plan
    PgFromExpression43{{"PgFromExpression[43∈0] ➊"}}:::plan
    PgFromExpression56{{"PgFromExpression[56∈0] ➊"}}:::plan
    Access8 -->|rejectNull| PgSelect10
    Object13 & PgFromExpression30 & PgFromExpression43 & PgFromExpression56 --> PgSelect10
    Access11{{"Access[11∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access11 & Access12 --> Object13
    PgSelect22[["PgSelect[22∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access20{{"Access[20∈0] ➊<br />ᐸ19.1ᐳ"}}:::plan
    Access20 -->|rejectNull| PgSelect22
    Object13 --> PgSelect22
    PgSelect36[["PgSelect[36∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access34{{"Access[34∈0] ➊<br />ᐸ33.1ᐳ"}}:::plan
    Access34 -->|rejectNull| PgSelect36
    Object13 --> PgSelect36
    PgSelect49[["PgSelect[49∈0] ➊<br />ᐸspectaclesᐳ"]]:::plan
    Access47{{"Access[47∈0] ➊<br />ᐸ46.1ᐳ"}}:::plan
    Access47 -->|rejectNull| PgSelect49
    Object13 --> PgSelect49
    Lambda7{{"Lambda[7∈0] ➊<br />ᐸspecifier_User_pipeStringᐳ<br />More deps:<br />- Constantᐸ'users|1'ᐳ[58]"}}:::plan
    Lambda7 --> Access8
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access11
    __Value2 --> Access12
    First14{{"First[14∈0] ➊"}}:::plan
    PgSelectRows15[["PgSelectRows[15∈0] ➊"]]:::plan
    PgSelectRows15 --> First14
    PgSelect10 --> PgSelectRows15
    PgSelectSingle16{{"PgSelectSingle[16∈0] ➊<br />ᐸusersᐳ"}}:::plan
    First14 --> PgSelectSingle16
    Lambda19{{"Lambda[19∈0] ➊<br />ᐸspecifier_Spectacle_pipeStringᐳ<br />More deps:<br />- Constantᐸundefinedᐳ[18]"}}:::plan
    Lambda19 --> Access20
    First24{{"First[24∈0] ➊"}}:::plan
    PgSelectRows25[["PgSelectRows[25∈0] ➊"]]:::plan
    PgSelectRows25 --> First24
    PgSelect22 --> PgSelectRows25
    PgSelectSingle26{{"PgSelectSingle[26∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First24 --> PgSelectSingle26
    PgClassExpression27{{"PgClassExpression[27∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle26 --> PgClassExpression27
    PgClassExpression27 -->|trapInhibited| PgFromExpression30
    Lambda33{{"Lambda[33∈0] ➊<br />ᐸspecifier_Spectacle_pipeStringᐳ<br />More deps:<br />- Constantᐸ'spectacles|1'ᐳ[59]"}}:::plan
    Lambda33 --> Access34
    First38{{"First[38∈0] ➊"}}:::plan
    PgSelectRows39[["PgSelectRows[39∈0] ➊"]]:::plan
    PgSelectRows39 --> First38
    PgSelect36 --> PgSelectRows39
    PgSelectSingle40{{"PgSelectSingle[40∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First38 --> PgSelectSingle40
    PgClassExpression41{{"PgClassExpression[41∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle40 --> PgClassExpression41
    PgClassExpression41 -->|trapInhibited| PgFromExpression43
    Lambda46{{"Lambda[46∈0] ➊<br />ᐸspecifier_Spectacle_pipeStringᐳ<br />More deps:<br />- Constantᐸ'query'ᐳ[60]"}}:::plan
    Lambda46 --> Access47
    First51{{"First[51∈0] ➊"}}:::plan
    PgSelectRows52[["PgSelectRows[52∈0] ➊"]]:::plan
    PgSelectRows52 --> First51
    PgSelect49 --> PgSelectRows52
    PgSelectSingle53{{"PgSelectSingle[53∈0] ➊<br />ᐸspectaclesᐳ"}}:::plan
    First51 --> PgSelectSingle53
    PgClassExpression54{{"PgClassExpression[54∈0] ➊<br />ᐸ__spectacles__ᐳ"}}:::plan
    PgSelectSingle53 --> PgClassExpression54
    PgClassExpression54 -->|trapInhibited| PgFromExpression56
    PgClassExpression17{{"PgClassExpression[17∈1] ➊<br />ᐸ__users__.”username”ᐳ"}}:::plan
    PgSelectSingle16 --> PgClassExpression17
    PgClassExpression31{{"PgClassExpression[31∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression17 o--o PgClassExpression31
    PgClassExpression44{{"PgClassExpression[44∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression31 o--o PgClassExpression44
    PgClassExpression57{{"PgClassExpression[57∈1] ➊<br />ᐸ(1/0) /* E...ferred! */ᐳ"}}:::plan
    PgClassExpression44 o--o PgClassExpression57

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,Lambda7,Access8,PgSelect10,Access11,Access12,Object13,First14,PgSelectRows15,PgSelectSingle16,Lambda19,Access20,PgSelect22,First24,PgSelectRows25,PgSelectSingle26,PgClassExpression27,PgFromExpression30,Lambda33,Access34,PgSelect36,First38,PgSelectRows39,PgSelectSingle40,PgClassExpression41,PgFromExpression43,Lambda46,Access47,PgSelect49,First51,PgSelectRows52,PgSelectSingle53,PgClassExpression54,PgFromExpression56 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgClassExpression17,PgClassExpression31,PgClassExpression44,PgClassExpression57 bucket1

